'use strict';

const Controller = require('egg').Controller;

class LectureRController extends Controller {
  async index() {
    const { ctx, service } = this;
    const res = await service.lecturer.getAllRelation(ctx.state.user.data._id);
    ctx.body = res;
  }
  async show() {
    const { ctx, service } = this;
    const res = await service.lecturer.getRelation(ctx.params.id, ctx.state.user.data._id);
    ctx.body = res;
  }
}

module.exports = LectureRController;
